home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
wfc007.000
/
test
/
tcsvcmgr.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-08
|
694b
|
32 lines
#include "test.h"
#pragma hdrstop
void test_CServiceControlManager( void )
{
CServiceControlManager manager;
CString machine_name( "Buckaroo" );
if ( manager.Open( GENERIC_READ, NULL, machine_name ) != TRUE )
{
printf( "Can't Open ServiceControlManager\n" );
return;
}
if ( manager.EnumerateStatus() == TRUE )
{
printf( "Services Running on %s:\n", (LPCTSTR) machine_name );
CServiceNameAndStatus status;
while( manager.GetNext( status ) == TRUE )
{
printf( "%s - \"%s\"\n", status.lpServiceName, status.lpDisplayName );
}
}
else
{
printf( "Can't Enumerate\n" );
}
}